<a href="https://github.com/socketstream/socketstream/edit/master/lib/utils/unique_set.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L11" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">UniqueSet</code>
<div><span class="hint">service in module <code ng:non-bindable="">utils</code>
</span>
</div>
</h1>
<div><h2 id="description">Description</h2>
<div class="description"><div class="utils-unique-set-page utils-unique-set-uniqueset-page"><p>This is used to maintain lists of userIds to socketIds and channelIds to socketIds</p>
</div></div>
<div class="member method"><h2 id="methods">Methods</h2>
<ul class="methods"><li><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L29" class="view-source icon-eye-open"> </a><h3 id="methods_add">add(key, value)</h3>
<div class="add"><div class="utils-uniqueset-add-page"><p>Add specific <code>key/value</code> set</p>
</div><h5 id="methods_add_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>key</td><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="utils-uniqueset-add-page"><p>Key name</p>
</div></td></tr><tr><td>value</td><td><a href="" class="label type-hint type-hint-mixed">Mixed</a></td><td><div class="utils-uniqueset-add-page"><p>Value to be assigned to the <code>key</code></p>
</div></td></tr></tbody></table></div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L101" class="view-source icon-eye-open"> </a><h3 id="methods_keys">keys()</h3>
<div class="keys"><div class="utils-uniqueset-keys-page"><p>Returns array of keys</p>
</div><h5 id="methods_keys_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">Array</a></td><td><div class="utils-uniqueset-keys-page"><p>Array of all the keys names</p>
</div></td></tr></table></div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L116" class="view-source icon-eye-open"> </a><h3 id="methods_members">members()</h3>
<div class="members"><div class="utils-uniqueset-members-page"><p>Returns array with all the values by certain <code>key</code></p>
</div><h5 id="methods_members_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-array">Array</a></td><td><div class="utils-uniqueset-members-page"><p>Array of all the keys for specified <code>key</code></p>
</div></td></tr></table></div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L58" class="view-source icon-eye-open"> </a><h3 id="methods_remove">remove(key, value)</h3>
<div class="remove"><div class="utils-uniqueset-remove-page"><p>Remove specific <code>key/value</code> set</p>
</div><h5 id="methods_remove_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>key</td><td><a href="" class="label type-hint type-hint-string">String</a></td><td><div class="utils-uniqueset-remove-page"><p>Key name</p>
</div></td></tr><tr><td>value</td><td><a href="" class="label type-hint type-hint-mixed">Mixed</a></td><td><div class="utils-uniqueset-remove-page"><p>Value related to the <code>key</code></p>
</div></td></tr></tbody></table><h5 id="methods_remove_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-boolean">Boolean</a></td><td><div class="utils-uniqueset-remove-page"><p>Remove state</p>
</div></td></tr></table></div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/3f3f67a/lib/utils/unique_set.js#L83" class="view-source icon-eye-open"> </a><h3 id="methods_removefromall">removeFromAll(value)</h3>
<div class="removefromall"><div class="utils-uniqueset-removefromall-page"><p>Remove all specific <code>key/value</code> sets accotding to <code>value</code></p>
</div><h5 id="methods_removefromall_parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>value</td><td><a href="" class="label type-hint type-hint-mixed">Mixed</a></td><td><div class="utils-uniqueset-removefromall-page"><p>Value as a link for removal all the sets</p>
</div></td></tr></tbody></table><h5 id="methods_removefromall_returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-boolean">Boolean</a></td><td><div class="utils-uniqueset-removefromall-page"><p>Removal status</p>
</div></td></tr></table></div>
</li>
</ul>
</div>
</div>
